import http from '@/common/http.js'

export async function getTypes() { //获取宠物类型列表
	return await http({
		url: '/pet/types',
		method: 'GET',
	})
}
export async function getPetinfo(data) { //根据ID获取宠物信息
	return await http({
		url: '/pet/get/'+data.id,
		method: 'GET',
	})
}
export async function getPethome(data) { //随机宠物配对
	return await http({
		url: '/pet/pair',
		method: 'POST',
		data:data
	})
}
export async function getmyPet() { //用户获取自己的宠物列表
	return await http({
		url: '/pet/myPet',
		method: 'GET',
	})
}
export async function addPet(data) { //添加宠物档案
	return await http({
		url: '/pet/add',
		method: 'POST',
		data:data
	})
}
export async function updatePet(data) { //更新宠物档案
	return await http({
		url: '/pet/update',
		method: 'PUT',
		data:data
	})
}
